<?php

namespace app\api\validate;

use think\Validate;

class UserValidate extends Validate{

    protected $rule = [
        'avatar'    => 'require',
        'gender'    => 'require|in:0,1',
        'birthday'  => 'require|dateFormat:Y-m-d',
        'education' => 'require|in:0,1,2,3,4,5,6',
        'seniority' => 'require',
        'bio'       => 'require',
        'identity'  => 'length:15,18',
        'province'  => 'require',
        'city'      => 'require',
        'area'      => 'require',
        'address'   => 'require',
    ];

    /*protected $message = [
        'name.require' => 'wewe',
        'name.in' => 'wewe',
    ];*/

    protected $field = [
        'avatar'    => '头像',
        'gender'    => '性别',
        'birthday'  => '生日',
        'education' => '学历',
        'seniority' => '辈分',
        'bio'       => '座右铭',
        'identity'  => '身份证',
        'province'  => '省',
        'city'      => '市',
        'area'      => '区',
        'address'   => '详细地址',
    ];
}